package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class MultipleColumnAssignment implements SetClause {

    private int beginIndex;
    private int endIndex;
    private SetTargetList setTargetList;
    private ContextuallyTypedRowValueExpression assignedRow;

    public MultipleColumnAssignment(int beginIndex,
                                    SetTargetList setTargetList,
                                    ContextuallyTypedRowValueExpression assignedRow) {
        this.beginIndex = beginIndex;
        this.endIndex = assignedRow.getEndIndex();
        this.setTargetList = setTargetList;
        this.assignedRow = assignedRow;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SetTargetList getSetTargetList() {
        return setTargetList;
    }

    public ContextuallyTypedRowValueExpression getAssignedRow() {
        return assignedRow;
    }

}
